﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterForum.master" AutoEventWireup="true" CodeFile="profilo.aspx.cs" Inherits="src_profilo" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <title>Profilo</title>
    <link rel="stylesheet" type="text/css" href="../css/profilo.css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

    <div id="container">
        <div id="contenuto">

            <%
                String scelta = Request.QueryString["scelta"];

                if (scelta == "editPswd")
                {
                
            %>
            <h1>Modifica password</h1>
            <table>
                <tr>
                    <td>Vecchia password</td>
                    <td>
                        <asp:TextBox ID="oldPass" runat="server" TextMode="Password"></asp:TextBox></td>
                </tr>
                <tr>
                    <td>Nuova password</td>
                    <td>
                        <asp:TextBox ID="newPass" runat="server" TextMode="Password"></asp:TextBox></td>
                </tr>
                <tr>
                    <td>Conferma nuova password</td>
                    <td>
                        <asp:TextBox ID="confPass" runat="server" TextMode="Password"></asp:TextBox></td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="Ris" runat="server" ForeColor="#B73C3E"></asp:Label>
                    </td>
                    <td>
                        <asp:Button ID="Button1" runat="server" Text="Conferma" OnClick="Button1_Click" /></td>
                </tr>
            </table>
            <%
                }
                else if (scelta == null || scelta == "showProfilo")
                {%>
                <h1>Profilo Utente</h1>
                <table cellspacing="20px">
                    <tr>
                        <td>Nome:</td>
                        <td>
                            <asp:Label ID="LBnome" runat="server" Text=""></asp:Label>
                            <asp:TextBox ID="TBnome" runat="server" Visible="false"></asp:TextBox>

                        </td>
                    </tr>
                    <tr>
                        <td>Cognome:</td>
                        <td>
                            <asp:Label ID="LBcognome" runat="server" Text=""></asp:Label>
                            <asp:TextBox ID="TBcognome" runat="server" Visible="false"></asp:TextBox>

                        </td>
                    </tr>
                    <tr>
                        <td>Email:</td>
                        <td>
                            <asp:Label ID="LBEmail" runat="server" Text=""></asp:Label>
                            <asp:TextBox ID="TBEmail" runat="server" Visible="false"></asp:TextBox>

                        </td>
                    </tr>
                    <tr>
                        <td>Modifica profilo :</td>
                        <td>
                            <asp:Button ID="BEdit" runat="server" Text="Modifica" OnClick="BEdit_Click" />
                            <asp:Button ID="Bsend" runat="server" Text="Modifica" OnClick="Bsend_Click" Visible="false"/>
                        </td>
                    </tr>
                </table>
            <%
            } else {
            %>
            <h1>Non ancora inserito l'opzione</h1>
            <%} %>
        </div>

        <div id="sinistra">
        <h1>Profilo</h1>
            <div id="sopra">
                <img class="image" src="<% Response.Write(utente.img); %>" />
                <center>
                <asp:FileUpload ID="fileupload1" runat="server" /><br />
                    <asp:Button ID="Bupload" runat="server" text="Upload" OnClick="Bupload_Click" />
                
            </div>
            <div id="sotto">
                <div id="right-part">

                <h1>Impostazioni</h1>
               <ul id="subnavi">

                    <a href="?scelta=editPswd">
                        <% Response.Write("<li"); if (scelta == "editPswd") Response.Write(" class=\"active\" "); else Response.Write(""); %>>Modifica password</li>
                    </a>
                    <a href="?scelta=showProfilo">
                        <% Response.Write("<li"); if (scelta == "showProfilo" || scelta == null) Response.Write(" class=\"active\" "); else Response.Write(""); %>>Visualizza profilo</li>
                    </a>
                </ul>

            </div>
        </div>

    </div>


</asp:Content>

